using Microsoft.Practices.ServiceLocation;
using MvcMall.Core.Contacts.Services;
using MvcMall.Core.Domains;
using MvcMall.Portal.Controllers.Stores.ViewModels;

namespace MvcMall.Portal.Controllers.Stores.Mappers
{
    public class GoodsBrandDomainToDtoMapper
    {
        public GoodsBrandDtoModel MapFrom(GoodsBrand input)
        {
            var model = new GoodsBrandDtoModel
                            {
                                BrandImage = input.BrandImage,
                                BrandName = input.BrandName,
                                GoodsCat = input.GoodsCat.Id,
                                GoodsCatName = input.GoodsCat.CatName,
                                Id = input.Id
                            };
            return model;
        }
    }
}